package com.lime49.lockcrypt.ui;

import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JOptionPane;

/**
 * A dialog which provides an OK/CANCEL result
 */
public class AbstractDialog extends JDialog {
    protected JDialog thisDialog = this;
    protected int result = JOptionPane.CANCEL_OPTION;

    public AbstractDialog(JDialog owner, boolean modal) {
        super(owner, modal);
    }

    public AbstractDialog(JDialog owner, String title, boolean modal) {
        super(owner, title, modal);
    }

    public AbstractDialog(JFrame owner, boolean modal) {
        super(owner, modal);
    }

    public AbstractDialog(JFrame owner, String title, boolean modal) {
        super(owner, title, modal);
    }

/*    public AbstractDialog(ILanguageParent owner, String title, boolean modal) {
        super(owner instanceof JDialog ? (JDialog)owner : null, title, modal);
    }*/

    /**
    * Returns the result from the dialog
    * @return JOptionPane.OK_MESSAGE or JOptionPane.CANCEL_MESSAGE
    */
    public int getResult() {
        return this.result;
    }
}
